<?php
class DBFunctions {
	private $conn;
		
	function connectDB() {
		$this->conn = mysqli_connect('localhost', 'derek', 'hammer')
			or die ('Error connecting to mysql');
		mysqli_select_db($this->conn, 'Africa');
		return $this->conn;
	}
	
	function query($query) {
		return mysqli_query($this->conn, $query);
	}
	
	function closeDB() {
		mysqli_close($this->conn);
	}
}
?>